<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>welcome to 2020</title>
    <style> .rr{float:left;width:50%;}</style>
</head>
<body>
<div style="width:600px;height:30px">
    <div class="rr"> welcome to my webpage

    <ul>
    <li><a href="/news">查看新闻</a></li>
    <li><a href="/product">查看产品</a></li>
</ul>
</div>

    <img src="{{ url_for('static',filename='img/main.jpg')}}" alt="">

     <div class="rr">
       {% if session['username'] == 'cao'  %}     #如果session中用户名为cao，以及注销链接
        <a href="#">{{ session['username']}}</a>
        <a href="#">注销</a>
    {% else %}
        <a href="#">登陆</a> #否则就显示登录与注册链接
        <a href="#">注册</a>
    {% endif %}

    </div>
    <div style="clear:both;"></div>
</div>

<hr>

</body>
</html>